{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "aec3cc6a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{1, 2, 5, 6}\n",
      "{1, 2, 3, 4, 5, 6}\n",
      "{3, 4}\n",
      "{1, 2}\n"
     ]
    }
   ],
   "source": [
    "A={1,2,3,4}\n",
    "B={3,4,5,6}\n",
    "\n",
    "print(A^B)\n",
    "print(A.union(B))\n",
    "print(A.intersection(B))\n",
    "print(A-B)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "9f5d9e16",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[1, 0], [0, 1]]\n",
      "<class 'list'>\n",
      "[[1 2]\n",
      " [3 4]]\n",
      "<class 'numpy.matrix'>\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "\n",
    "a =[[1,2],[3,4]]\n",
    "A = np.matrix(a)\n",
    "b =[[1,0],[0,1]]\n",
    "B =np.matrix(b)\n",
    "print(b) \n",
    "print(type(b))\n",
    "print(A*B)\n",
    "print(type(A*B))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "ba9f672f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'lista': [1, 2, 3], 'tupla': (4, 5, 6), 'conjunto': {8, 9, 7}}\n",
      "[1, 2, 3]\n",
      "(4, 5, 6)\n"
     ]
    }
   ],
   "source": [
    "d = {\"lista\":[1,2,3],\"tupla\":(4,5,6),\"conjunto\":{7,8,9}}\n",
    "print(d)\n",
    "print(d[\"lista\"])\n",
    "print(d.get(\"tupla\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "5462fb56",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(10.5+20j)\n",
      "True\n"
     ]
    }
   ],
   "source": [
    "c = 45 -33.5+(-1+20j)\n",
    "print(c)\n",
    "print(isinstance(c,complex))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e1662a3d",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
